var _util = require("./lib/utils/util.js");
App({
  onLaunch: function () {
      var l = this;
    // 展示本地存储能力
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    wx.getSystemInfo({
        success (res) {
           l.globalData.systemInfo = res
        }
      })
      wx.getSystemInfo({
        success: function(e) {
            var t = e.screenHeight / e.screenWidth;
            l.globalData.navHeight = e.statusBarHeight * (750 / e.windowWidth) + 97, l.globalData.winHeight = e.windowHeight, 
            // console.log(l.globalData.navHeight)
            l.globalData.screenTotalH = 750 * t;
            var i = e.model, a = e.screenHeight, n = e.statusBarHeight, o = /iphone x/i.test(i), r = /iphone 11/i.test(i), s = o || r, u = n;
            l.globalData.deviceType = s ? "iPhone-X" : "", l.globalData.statusBarHeight = u;
            // console.log(l.globalData.deviceType)
        },
        fail: function(e) {}
    });
    var i = wx.getUpdateManager();
        i.onCheckForUpdate(function(e) {}), i.onUpdateReady(function() {
            wx.showModal({
                title: "更新提示",
                content: "已更新至最新版本，是否重启应用？",
                success: function(e) {
                    e.confirm && i.applyUpdate();
                }
            });
        }), i.onUpdateFailed(function() {
            return t.Tips({
                title: "新版本下载失败"
            });
        });
  },
  globalData: {
    code: 0,
    urlImages: "",
    statusBarHeight: 0,
    token: wx.getStorageSync('token'),
    isLog: 0,
    addrInfo:{},
    userInfo: wx.getStorageSync('userInfo'),
    expiresTime:0,
    systemInfo:'',
    cate_id:0,
    url:'https://legwork.xiaozhuxiaoyuan.com',
  },
  Tips: function(e, t) {
    return _util.Tips(e, t);
},SplitArray:function(e, t) {
  return _util.SplitArray(e, t);
},
})
//"pages/escort_center/index",